home *** CD-ROM | disk | FTP | other *** search
- #define DRAWDOCUMENT_H_ID "$Id: DrawDocument.h,v 1.15 1992/03/30 17:04:03 pfkeb Rel $"
-
- #import <appkit/Responder.h>
- #import <appkit/graphics.h>
-
- @interface DrawDocument : Object
- {
- id view; /* the document's GraphicView */
- id window; /* the window the GraphicView is in */
- id printInfo; /* the print information for the GraphicView */
- id listener; /* the icon-dragging listener */
- id hDraw; /* drawing controler global object */
-
- char *name; /* the name of the document */
- char *directory; /* the directory it is in */
- char *iconPathList; /* list of files last dragged over document */
- BOOL haveSavedDocument; /* whether document has associated disk file */
- }
-
- /* Very private instance method needed by factory methods */
-
- - (BOOL)loadDocument:(NXStream *)stream frameSize:(NXRect *)frame;
-
- /* Factory methods */
-
- + new;
- + newFromStream:(NXStream *)stream;
- + newFromFile:(const char *)file;
-
- /* Public methods */
- - openTupleFile:(const char *)path;
- /* Opens the tuple file with path path.
- */
-
- - free;
-
- - loadImageFile:(const char *)file at:(const NXPoint *)p allowAlpha:(BOOL)alphaOk;
- - resetScrollers;
- - view;
- - printInfo;
-
- /* Target/Action methods */
-
- - changeLayout:sender;
- - getPageFrame:(NXRect *)frame;
- /*
- * Returns via argument the size of a page minus margins
- */
-
- - changeGrid:sender;
- - save:sender;
- - saveAs:sender;
- - saveTo:sender;
- - revertToSaved:sender;
- - showTextRuler:sender;
- - hideRuler:sender;
-
- /* Private method used by saveTo: method */
-
- - changeSaveType:sender;
-
- /* Document name and file handling methods */
-
- - (const char *)filename;
- - (const char *)directory;
- - (const char *)name;
- - setName:(const char *)name andDirectory:(const char *)directory;
- - setName:(const char *)name;
- - saveTo:(const char *)type using:(SEL)streamWriter;
- - save;
- - (BOOL)needsSaving;
-
- /* Services menu methods */
-
- - registerForServicesMenu;
- - validRequestorForSendType:(NXAtom)sendType andReturnType:(NXAtom)returnType;
- - writeSelectionToPasteboard:pboard types:(NXAtom *)types;
-
- /* Window delegate methods */
-
- - windowWillClose:sender action:(const char *)action;
-
- - windowWillClose:sender;
- - windowDidBecomeMain:sender;
- - windowWillResize:sender toSize:(NXSize *)size;
-
- /* Workspace Manager icon-dragging methods */
-
- - registerWindow;
- - unregisterWindow;
- - (int)iconEntered:(int)windowNum at:(double)x :(double)y
- iconWindow:(int)iconWindowNum iconX:(double)iconX iconY:(double)iconY
- iconWidth:(double)iconWidth iconHeight:(double)iconHeight
- pathList:(char *)pathList;
- - (int)iconReleasedAt:(double)x :(double)y ok:(int *)flag;
-
- /* Menu command validation method */
-
- - (BOOL)validateCommand:menuCell;
-
- /* Cursor setting */
-
- - resetCursor;
-
- @end
-
-